package com.yihu.cms.service;

import java.io.IOException;

import com.yihu.beans.ResultVO;
import com.yihu.beans.dic.Config;
import com.yihu.beans.dic.DatadicQuery;
import com.yihu.beans.dic.Resource;
import com.yihu.beans.dic.ResultCode;
import com.yihu.beans.user.Group;
import com.yihu.dataService.hessian.mongodb.interfaceService.DataDictionaryHService;
import com.yihu.dataService.hessian.mongodb.interfaceService.UserHService;
import com.yihu.dataService.hessian.resource.ResourceMongoDBManager;


public class DataDictionaryService{
	DataDictionaryHService dicService = null;
	public DataDictionaryService(){
		try {
			dicService= (DataDictionaryHService)ResourceMongoDBManager.getSingleton().getBeans("dicServiceHSC");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public ResultVO addDataConfig(Config config){
		return dicService.addDataConfig(config);
	}
	public ResultVO deleteDataConfig(Config config){
		return dicService.deleteDataConfig(config);
	}
	public Object getDataConfig(Config config){
		return dicService.getDataConfig(config);
	}
	public ResultVO updateDataConfig(Config config){
		return dicService.updateDataConfig(config);
	}
	public Object getDataConfigs(DatadicQuery query){
		return dicService.getDataConfigs(query);
	}
	
	
	//resource
	public ResultVO addDataResource(Resource resource){
		return dicService.addDataResource(resource);
	}
	public ResultVO deleteDataResource(Resource resource){
		return dicService.deleteDataResource(resource);
	}
	public Object getDataResource(Resource resource){
		return dicService.getDataResource(resource);
	}
	public ResultVO updateDataResource(Resource resource){
		return dicService.updateDataResource(resource);
	}
	public Object getDataResources(DatadicQuery query){
		return dicService.getDataResources(query);
	}
	
	public Object getChildrenByParent(DatadicQuery dicQuery){
		return dicService.getChildrenByParent(dicQuery);
	}
	
	public Object getParentsByCurrentId(String id ){
		return dicService.getParentsByCurrentId(id);
	}
	
	
	
	
	
	//resultCode
	public ResultVO addDataResultCode(ResultCode resultCode){
		return dicService.addDataResultCode(resultCode);
	}
	public ResultVO deleteDataResultCode(ResultCode resultCode){
		return dicService.deleteDataResultCode(resultCode);
	}
	public Object getDataResultCode(ResultCode resultCode){
		return dicService.getDataResultCode(resultCode);
	}
	public ResultVO updateDataResultCode(ResultCode resultCode){
		return dicService.updateDataResultCode(resultCode);
	}
	public Object getDataResultCodes(DatadicQuery query){
		return dicService.getDataResultCodes(query);
	}

	public Resource getDicByPath(DatadicQuery query){
		return dicService.getDicByPath(query);
	}
	
}
